package com.mes.source;

import org.openbravo.client.kernel.BaseComponentProvider;
import org.openbravo.client.kernel.Component;
import org.openbravo.client.kernel.ComponentProvider;
import javax.enterprise.context.ApplicationScoped;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@ApplicationScoped
@ComponentProvider.Qualifier(ImportBaseJsComponentProvider.BASE_JS_IMPORT)
public class ImportBaseJsComponentProvider extends BaseComponentProvider {
	public static final String BASE_JS_IMPORT = "BASE_JS_IMPORT";

	@Override
	public Component getComponent(String componentId, Map<String, Object> parameters) {
		throw new IllegalArgumentException("Component id " + componentId + " not supported.");
	}

	@Override
	public List<ComponentResource> getGlobalComponentResources() {
	    final List<ComponentResource> globalResources = new ArrayList<ComponentResource>();
		//20180417添加提醒
		globalResources.add(createStaticResource("web/com.basic/js/message_eqWarn.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/message.js", false));
		globalResources.add(createStaticResource("web/com.report/js/receipt_View.js", false));
		globalResources.add(createStaticResource("web/com.report/js/report_view.js", false));
		globalResources.add(createStaticResource("web/com.report/js/report-manager.js", false));
		globalResources.add(createStaticResource("web/com.report/js/window.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/dataImport.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/lodop/LodopFuncs.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/lodop/Lodop-Print-Design.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/fileUpload.js", false));
		globalResources.add(createStaticResource("web/com.basic/js/zebra/zebraPrinter.js", false));
		return globalResources;
	}

	public List<String> getTestResources() {
		return Collections.emptyList();
	}
}
